package com.javacodegeeks.enterprise.hibernate;

import org.hibernate.classic.Session;

import com.jaacodegeeks.enterprise.hibernate.utils.HibernateUtil;

public class App {

	public static void main(String[] args) {
		Session session = HibernateUtil.getSessionFactory().openSession();
		session.beginTransaction();
		Product product1 = new Product();

		product1.setColor("yellow");
		product1.setModel("XYZ");
		product1.setNum(500);
		product1.setSize("XL");

		session.save(product1);
		session.getTransaction().commit();
		System.out.println("u saved this product information");
	}

}
